﻿using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Gao.Poker.Domain
{
    [NotMapped]
    public class MemberSeat : Member
    {
        private String _seatNum;

        public String TableNum { get; set; }

        public int? SeatingNum { get; set; }

        /// <summary>
        /// 首次买入
        /// </summary>
        public int BuyNumber { get; set; }
        /// <summary>
        /// 重新买入人数
        /// </summary>
        public int BuyAgainNumber { get; set; }
        /// <summary>
        /// 最后买入人数
        /// </summary>
        public int BuyLastNumber { get; set; }
        /// <summary>
        /// 买入金额
        /// </summary>
        public Decimal BuyMoney { get; set; }

        /// <summary>
        /// 名次
        /// </summary>
        public int Rank { get; set; }
        /// <summary>
        /// 奖金
        /// </summary>
        public Decimal Bonus { get; set; }
        /// <summary>
        /// 退出比赛 0，正常 1 退出
        /// </summary>
        public int OutState { get; set; }

        public Boolean Out { get { return OutState == 0; } }

        public String SeatNum
        {
            get
            {
                _seatNum = String.Format("{0}桌{1}座", TableNum, SeatingNum);
                return _seatNum;
            }
            set { _seatNum = value; }
        }
    }
}
